package krautz.fitness;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class NutritionFactsWebView extends Activity {
	private String restaurant;
	private String foodname;
	private WebView mWebView;
	
	
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.nutritionfactswebview);
		Bundle bundle = getIntent().getExtras();
		//this.restaurant = bundle.getString("restaurant");
		//this.foodname = bundle.getString("foodname");
		
		mWebView = (WebView) findViewById(R.id.webview);
	    mWebView.getSettings().setJavaScriptEnabled(true);
	    // '#', '%', '\', '?' should be replaced by %23, %25, %27, %3f respectively.
	    String summary = 
	    	"<html>" +
	    	"	<body>" +
	    	"		<center>" +
	    	"		<table style=\"border-width:1px; border-style:solid; border-color:black; width:90%25\">" +
	    	"			<tr>" +
	    	"				<td><h1>Nutrition&nbsp;Facts</h1>" +
	    	"				</td>" +
	    	"			</tr>" +
	    	"			<tr>" +
	    	"				<td>Serving Size</td>" +
	    	"			</tr>" +
	    	"			<tr>" +
	    	"				<td><center><div style=\"width:95%25; height:10px; background-color:black;\">&nbsp;</div></center></td>" +
	    	"			</tr>" +
	    	"		</table>" +
	    	"		</center>" +
	    	"	</body></html>";
			mWebView.loadData(summary, "text/html", "utf-8");

	}
}
